package com.company.utils;

/**
 * 取消订单
 */
public class CancellationInfo {
    public void cancellationInfo(String trackingNumber){
        for (int i = 0; i < MyOrderUtil.orders.size(); i++) {
            if (trackingNumber.equals(MyOrderUtil.orders.get(i).getTrackingNumber())){
                MyOrderUtil.orders.remove(i);
                System.out.println("取消成功!");
                break;
            }else if(!trackingNumber.equals(MyOrderUtil.orders.get(i).getTrackingNumber())){
                System.out.println("您输入的订单编号有误！");
                break;
            }
        }
        System.out.println("--------------------");
    }
}
